import Vue from 'vue'
import Router from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    // }
    {
      path: '/img',
      name: 'img',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "img" */ '@/views/imgs/Img.vue')
    },
    {
      path: '/img/:id/detail',
      name: 'imgDetail',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "ImgDetail" */ '@/views/imgs/ImgDetail.vue')
    },
    {
      path: '/newslist',
      name: 'newslist',
      component: () => import(/* webpackChunkName: "newslist" */ '../views/news/newsList.vue')
    },
    {
      path: '/newsdetail/:id',
      name: 'newsdetail',
      component: () => import(/* webpackChunkName: "newsdetail" */ '../views/news/newsDetail.vue')
    },
    {
      path: '/Cart',
      name: 'Cart',
      component: () => import(/* webpackChunkName: "Cart" */ '../views/Goods/Cart.vue')
    },
    {
      path: '/goosDetail/:id',
      name: 'goosDetail',
      component: () => import(/* webpackChunkName: "goosDetail" */ '../views/Goods/goosDetail.vue')
    },
    {
      path: '/goods_list',
      name: 'goods_list',
      component: () => import(/* webpackChunkName: "goods_list" */ '../views/Goods/goodsList.vue')
    },
    {
      path: '/member',
      name: 'member',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "member" */ '../views/Member.vue')
    },
    {
      path: '/goods_detail/:id/goods_desc',
      name: 'goods_desc',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "goods_desc" */ '../views/Goods/goods_desc.vue')
    },
    {
      path: '/goods_detail/:id/goodsCommon',
      name: 'goodsCommon',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "goodsCommon" */ '../views/Goods/goodsCommon.vue')
    }
  ]
})
